#!/usr/bin/env python

import csv
import chart

#headers = ['time','kbps','delay','fps','mfps']

def Parse_CSV(liveid, start):
    times = list()
    kbps = list()
    delay = list()
    fps = list()
    mfps = list()
    with open(liveid, 'r') as f:
        f_csv = csv.reader(f)
        for row in f_csv:
            if (row[0][0] != '#') and (row[0] > start):
                times.append(row[0])
                kbps.append(row[1])
                delay.append(row[2])
                fps.append(row[3])
                mfps.append(row[4])

    chart.Gen(times, kbps, delay, fps, mfps)

if __name__ == "__main__":
    Parse_CSV("test.csv", "00:00:00")


